package service.impl;

import dao.WlCommodityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.WlCommodity;
import service.WlCommodityService;

import javax.annotation.Resource;
import java.util.List;
@Service("wlCommodityService")
public class WlCommodityServiceimpl implements WlCommodityService {
    @Autowired
    @Resource(name="wlCommodityMapper")
    private WlCommodityMapper wlCommodityMapper;

    public WlCommodityMapper getWlCommodityMapper() {
        return wlCommodityMapper;
    }

    public void setWlCommodityMapper(WlCommodityMapper wlCommodityMapper) {
        this.wlCommodityMapper = wlCommodityMapper;
    }

    public List<WlCommodity> getAll(int page) {
        return wlCommodityMapper.getAll(page);
    }

    public int getCount() {
        return wlCommodityMapper.getCount();
    }

    public int addAir(WlCommodity w) {
        return wlCommodityMapper.addAir(w);
    }

    public void del(int id) {
        wlCommodityMapper.del(id);
    }

    public void upd(WlCommodity w) {
        wlCommodityMapper.upd(w);
    }

    public WlCommodity findOne(int id) {
        return wlCommodityMapper.findOne(id);
    }
}
